import request  from "@/utils/request.js";
const PREFIX = "/admin/tag"

export default {
    pageQueryTag(dto){
        return request({
            url:`${PREFIX}/page/list`,
            method:'post',
            data:dto
        })
    },
    getAllTags(){
        return request({
            url:`${PREFIX}/list/all`,
            method:'get'
        })
    },
    getTagInfo(tagId){
        return request({
            url: `${PREFIX}/info/${tagId}`,
            method:'get'
        })
    },
    addTag(dto){
        return request({
            url:`${PREFIX}/add`,
            method:'post',
            data:dto
        })
    },
    updateTag(dto){
        return request({
            url:`${PREFIX}/update`,
            method:'post',
            data:dto
        })
    },
    deleteTag(tagId){
        return request({
            url:`${PREFIX}/delete/${tagId}`,
            method:'DELETE'
        })
    }
}